You are here: Data creation and management > Data type management > Adding, updating, and deleting data for a data type > Importing data for a data type

Importing data for a data type

You can import a .csv file to add or update data for a data type.

When you import data into a data type, a .csv file is generated if there are any errors. The .csv file contains the error details for the records for each row in the file. You can fix the errors and reimport the data. You can change the location to which the .csv file is written using Dynamic System Settings. For example, for a multi-node system, you can set the destination to a shared location so that a user can access the file from any node in the system.

  1. Click the Data icon in the Explorer panel to display the Data Explorer.
  2. You can also import data for a case type by completing the steps that you follow in this task. To view case types for data import, select Data in the Explorer panel and select Show case types from the dropdown menu at the top right of the explorer.

  3. Click the data type for which you want to import data to display it in the Data Designer.
  4. Click the Records tab.
  5. Click Import.
  6. Upload a .csv file for data import.
  7. Map the fields in your data type with the fields in the .csv file.
  8. Select Skip default data type validation in the Import records step of the import process if you want to disable the validation of the data type by using validate rules.
  9. Note: The system always does basic type checking (string, integer, date, and so on) for imported fields. If you clear this check box, the data import process runs the default validate rule of the data type on each record that is imported, which causes the import to take longer. Hence, it is a best practice to clear this check box only when needed.

  10. Optional: Select Customize date/time to specify a date and time format when the .csv file contains unsupported formats. The data import wizard supports Pega and ISO 8601 date and time formats. For more information, see Understanding the Date, TimeofDay, and DateTime property types and the ISO 8601 date and time format documentation.

    Note:  Pega format MMM dd',' yyyy '-' HH:mm:ss z is supported when the Pega 7 Platform locale is en_US. For more information, see About the Locale Settings tool.

  11. Select Save customized field mapping as a template if you want to save the mapping between the fields in your data type and the fields in the .csv file as a template for future imports for the data type. Enter a name for the template in the field. You can use this template in data import process in future imports.
  12. Click Import. A dialog box listing the time taken for the import, the number of records created and updated, and the errors in the import are displayed.
  13. You can close the dialog box for the data import process. The process runs asynchronously and is visible on your worklist.

    You can also cancel the import by clicking Stop import. The import stops when the current batch finishes processing.

  14. If your data import process has errors, click Download to download a .csv file that lists the errors. The .csv file has an additional column that contains the error details for the records on each row in the file. You can fix the errors and import data again for your data type.
  15. Click Finish to return to the Data Designer and see the new and updated data for your data type.